import request from '@/utils/request'

// 获取所有药材
export function getAllMedicines() {
  return request({
    url: '/medicine/list',
    method: 'get'
  })
}

// 搜索药材
export function searchMedicines(keyword) {
  return request({
    url: '/medicine/search',
    method: 'get',
    params: { keyword }
  })
}

// 根据分类获取药材
export function getMedicinesByCategory(categoryId) {
  return request({
    url: '/medicine/category',
    method: 'get',
    params: { categoryId }
  })
}

// 获取热门药材
export function getHotMedicines() {
  return request({
    url: '/medicine/hot',
    method: 'get'
  })
} 